package com.zooltech.samples.img;

import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;

/**
 * <strong>Title : CG </strong>. <br>
 * <strong>Description : .</strong> <br>
 * <strong>Create on : 2013-8-19 下午7:50:00 </strong>. <br>
 * 
 * @author yinxb zooltech@gmail.com<br>
 * @version 1.0<br>
 * <br>
 * <strong>修改历史: .</strong> <br>
 * 修改人 修改日期 修改描述<br>
 * -------------------------------------------<br>
 * <br>
 */
public class CG {
	
	/**
	 * @param args 命令行参数
	 * @throws IOException io异常
	 */
	public static void main(String[] args) throws IOException{
		BufferedImage im = new BufferedImage(100, 100, BufferedImage.TYPE_INT_RGB);
		Graphics2D g = im.createGraphics();
		g.drawString("test", 30, 35);
		ImageIO.write(im, "PNG", new File("/test.png"));
		System.out.println("OK");
	}

}
